* NOTE: You need to set the Stata working directory to the path
* where the data file is located.

set more off

clear
quietly infix                 ///
  str     year       1-4      ///
  str     regiona    5-5      ///
  str     divisiona  6-6      ///
  str     state      7-30     ///
  str     statea     31-32    ///
  str     smsaa      33-36    ///
  str     county     37-93    ///
  str     countya    94-96    ///
  str     cty_suba   97-99    ///
  str     placea     100-103  ///
  str     tracta     104-109  ///
  str     scsaa      110-111  ///
  str     urb_areaa  112-115  ///
  str     cda        116-117  ///
  str     aianhha    118-120  ///
  str     zipa       121-125  ///
  str     areaname   126-185  ///
  double  dv7001     186-194  ///
  using `"nhgis0016_ds111_1980_county.dat"'


format dv7001    %9.0f

label var year      `"Data File Year"'
label var regiona   `"Region Code"'
label var divisiona `"Division Code"'
label var state     `"State Name"'
label var statea    `"State Code"'
label var smsaa     `"Standard Metropolitan Statistical Area Code"'
label var county    `"County Name"'
label var countya   `"County Code"'
label var cty_suba  `"County Subdivision Code"'
label var placea    `"Place Code"'
label var tracta    `"Census Tract Code"'
label var scsaa     `"Standard Consolidated Statistical Area Code"'
label var urb_areaa `"Urban Area Code"'
label var cda       `"Congressional District Code"'
label var aianhha   `"American Indian Area/Alaska Native Area/Hawaiian Home Land Code"'
label var zipa      `"5-Digit Zip Code Code"'
label var areaname  `"Area Name"'
label var dv7001    `"Total"'


